﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Progrom
{
    public partial class login : Form
    {
        public login()
        {
            InitializeComponent();
        }

        private void btnYes_Click(object sender, EventArgs e)
        {
            string userName = txtName.Text;
            string password = txtPwd.Text;

            if (userName == "litter_hui" && password=="123456")
            {
                MessageBox.Show("欢迎使用成绩管理系统", "登录成功",MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Tag = true;
            }
            else
            {
                MessageBox.Show("您输入的用户名或密码错误！请重试", "登录失败",MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                this.Tag = false;
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            txtName.Text = "";
            txtPwd.Text = "";
            txtName.Focus();
        }
    }
}
